home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / earkit / news / thor / rexx / pgpviewpubkeys.thor < prev    next >
Text File  |  1998-05-24  |  2KB  |  70 lines

  1. /* $VER: PGPViewPubKeys.thor 3.4 (15.5.95)
  2.  * 
  3.  * An ARexx script that will view the contents of your public 
  4.  * PGP keyring.
  5.  *
  6.  * Based on ViewPGPpubkeys.thor v0.9ß (01.06.94)  © Christian Sandberg
  7.  * Additions by: Eivind Nordseth, Ultima Thule Software.
  8.  */
  9.  
  10. options results
  11. options failat 99
  12.  
  13. if ~show('p', 'BBSREAD') then
  14. do
  15.         address command
  16.                 "run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
  17.                 "WaitForPort BBSREAD"
  18. end
  19.  
  20. REQUESTNOTIFY TEXT '"Do you want limited or full verbose?"' BT '"_Limited|_Full"'
  21. if RC > 0 then do
  22.    say 'This script is not running on the THOR ARexx port!'
  23.    exit
  24.    end
  25.  
  26. if result = 1 then verbose = 'v'
  27. else verbose = 'vv'
  28.  
  29. GETGLOBALCONFIG CFG
  30. if(rc ~= 0) then exit
  31.  
  32. address BBSREAD GETGLOBALDATA stem GLOBALDATA
  33. if(rc ~= 0) then exit
  34.  
  35. Call Close 'STDOUT'
  36. Call Close 'STDIN'
  37. Call Open 'STDOUT','CON:0/14//400/PGPAmiga/CLOSE/AUTO/WAIT/SCREEN' || CFG.PUBSCREENNAME
  38. Call Pragma '*','STDOUT'
  39. Call Open 'STDIN','*'
  40.  
  41. if GLOBALDATA.PGPCommand = '' then 
  42. do
  43.     call getpath
  44.     pgpcommand = result
  45. end
  46. else pgpcommand = GLOBALDATA.PGPCOMMAND
  47.  
  48. address command pgpcommand ' -k' || verbose
  49. if(rc ~= 0) then
  50. do
  51.     REQUESTNOTIFY TEXT '"PGP failed. Check path or PGPPATH envirorment variable."' BT '"_Ok"'
  52.     exit
  53. end
  54.  
  55. exit
  56.  
  57. getpath: procedure
  58. address command 'GetEnv >PIPE:PGPPATH PGPPATH'
  59. If rc = 0 Then
  60. Do
  61.     If Open('ppath','PIPE:PGPPATH','R') Then
  62.     Do
  63.         path = ReadLN('ppath')
  64.         If ~Close('ppath') Then Nop
  65.         path = path||'/PGP'
  66.         Return path
  67.     End
  68.     Else Return ""
  69. End
  70.